package com.dews.information.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dews.common.utils.DateUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;


/**
 * 学生信息详情对象 dews_student_info
 *
 * @author qingfeng
 * @date 2025-01-14
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("dews_student_info")
public class StudentInfo{

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户Id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("院系")
    @TableField("dep_id")
    private Long depId;

    @ApiModelProperty("专业")
    @TableField("subject_id")
    private Integer subjectId;

    @ApiModelProperty("学号")
    @TableField("student_num")
    private String studentNum;

    @ApiModelProperty("姓名")
    @TableField("student_name")
    private String studentName;

    @ApiModelProperty("出生日期")
    @TableField("birth")
    @DateTimeFormat(pattern = DateUtils.YYYY_MM_DD)
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD, timezone = DateUtils.GMT)
    private LocalDate birth;

    @ApiModelProperty("民族")
    @TableField("nation")
    private String nation;

    @ApiModelProperty("政治面貌")
    @TableField("politics_status")
    private String politicsStatus;

    @ApiModelProperty("入学时间")
    @DateTimeFormat(pattern = DateUtils.YYYY_MM_DD)
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD, timezone = DateUtils.GMT)
    @TableField("enter_time")
    private LocalDate enterTime;

    @ApiModelProperty("毕业时间")
    @TableField("graduate_time")
    @DateTimeFormat(pattern = DateUtils.YYYY_MM_DD)
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD, timezone = DateUtils.GMT)
    private LocalDate graduateTime;

    @ApiModelProperty("身份证号")
    @TableField("id_card")
    private String idCard;

    @ApiModelProperty("在校状态")
    @TableField("state_school")
    private String stateSchool;

    @ApiModelProperty("年级")
    @TableField("grade")
    private String grade;

    @ApiModelProperty("班级")
    @TableField("clazz_id")
    private Integer clazzId;

    @ApiModelProperty("学制")
    @TableField("educational_system")
    private Integer educationalSystem;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    @DateTimeFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS, timezone = DateUtils.GMT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField("update_time")
    @DateTimeFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS, timezone = DateUtils.GMT)
    private LocalDateTime updateTime;

}
